function showStatus(success, msg) {
    var content;
    var idrandom = Math.floor(Math.random() * 1000);
    if (success) {
        content = "<div id=" + idrandom + " class='ui-state-highlight ui-corner-all'>" +
            "<p style='margin: 0'>" +
            "<span class='ui-icon ui-icon-info' style='float: left; margin-right: .3em;'></span>" +
            "<strong>Hey!</strong> " + msg + "</p>" +
            "</div>";
    } else {
        content = "<div id=" + idrandom + " class='ui-state-error ui-corner-all'>" +
            "<p style='margin: 0'>" +
            "<span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>" +
            "<strong>Error!</strong>" + msg + "</p>" +
            "</div>";
    }
//    $('#alerts').html('');
    $('#alerts').append(content);
    $('#' + idrandom).hide();
    $('#' + idrandom).animate({height:'toggle'}, 1000).animate({opacity:1}, 4000).animate({height:'toggle'}, 1000);
}

function showDialog(url, title, width, heigth) {
    $('<div>').dialog({
        modal:true,
        open:function () {
            $(this).load(url);
        },
        width:width,
        title:title });

}
